package dao

import (
	"time"
)

// 这是 LiDistributionGoods 的全局公开dao对象
var LiDistributionGoodsDao = liDistributionGoodsDao{}

// 这是 li_distribution_goods表 的实体类
type LiDistributionGoods struct {
	Id         int       `json:"id" form:"id" v:"id"`                            // ID
	CreateBy   string    `json:"create_by" form:"create_by" v:"create_by"`       // 创建者
	CreateTime time.Time `json:"create_time" form:"create_time" v:"create_time"` // 创建时间
	Commission float64   `json:"commission" form:"commission" v:"commission"`    // 佣金金额
	GoodsId    string    `json:"goods_id" form:"goods_id" v:"goods_id"`          // 商品ID
	GoodsName  string    `json:"goods_name" form:"goods_name" v:"goods_name"`    // 商品名称
	Price      float64   `json:"price" form:"price" v:"price"`                   // 商品价格
	Quantity   int       `json:"quantity" form:"quantity" v:"quantity"`          // 库存
	StoreId    string    `json:"store_id" form:"store_id" v:"store_id"`          // 店铺ID
	SkuId      string    `json:"sku_id" form:"sku_id" v:"sku_id"`                // 规格ID
	Specs      string    `json:"specs" form:"specs" v:"specs"`                   // 规格信息json
	Thumbnail  string    `json:"thumbnail" form:"thumbnail" v:"thumbnail"`       // 缩略图路径
	StoreName  string    `json:"store_name" form:"store_name" v:"store_name"`    // storeName

}

// 注意:这是 LiDistributionGoods 的私有dao对象
type liDistributionGoodsDao struct {
	Insert func(arg LiDistributionGoods) int                 //插入一条记录
	Update func(arg LiDistributionGoods) int                 //更新一条记录
	Delete func(arg LiDistributionGoods) int                 //删除一条记录
	Select func(arg LiDistributionGoods) LiDistributionGoods //获取一条记录
}
